package com.icehand.disruptor.starter.hooks;

import com.lmax.disruptor.dsl.Disruptor;

/**
 * shutdown hook
 * @author zhoujunmei
 * @date 2019-07-24 11:05
 */
public class DisruptorShutdownHook implements Runnable {
    private Disruptor disruptor;

    public DisruptorShutdownHook(Disruptor disruptor){
        this.disruptor = disruptor;
    }
    @Override
    public void run() {
        disruptor.shutdown();
    }
}
